﻿/*
 * This script will create the database needed to run SportsStore
 * If you have already created a blank database called SportsStore, then just run the
 * lines following the "If you've already created..." comment below.
*/

USE [master]
GO
/****** Object:  Database [SportsStore]    Script Date: 02/10/2009 13:47:06 ******/
CREATE DATABASE [SportsStore]
GO
IF (1 = FULLTEXTSERVICEPROPERTY('IsFullTextInstalled'))
begin
EXEC [SportsStore].[dbo].[sp_fulltext_database] @action = 'enable'
end
GO
ALTER DATABASE [SportsStore] SET ANSI_NULL_DEFAULT OFF
GO
ALTER DATABASE [SportsStore] SET ANSI_NULLS OFF
GO
ALTER DATABASE [SportsStore] SET ANSI_PADDING OFF
GO
ALTER DATABASE [SportsStore] SET ANSI_WARNINGS OFF
GO
ALTER DATABASE [SportsStore] SET ARITHABORT OFF
GO
ALTER DATABASE [SportsStore] SET AUTO_CLOSE OFF
GO
ALTER DATABASE [SportsStore] SET AUTO_CREATE_STATISTICS ON
GO
ALTER DATABASE [SportsStore] SET AUTO_SHRINK OFF
GO
ALTER DATABASE [SportsStore] SET AUTO_UPDATE_STATISTICS ON
GO
ALTER DATABASE [SportsStore] SET CURSOR_CLOSE_ON_COMMIT OFF
GO
ALTER DATABASE [SportsStore] SET CURSOR_DEFAULT  GLOBAL
GO
ALTER DATABASE [SportsStore] SET CONCAT_NULL_YIELDS_NULL OFF
GO
ALTER DATABASE [SportsStore] SET NUMERIC_ROUNDABORT OFF
GO
ALTER DATABASE [SportsStore] SET QUOTED_IDENTIFIER OFF
GO
ALTER DATABASE [SportsStore] SET RECURSIVE_TRIGGERS OFF
GO
ALTER DATABASE [SportsStore] SET  ENABLE_BROKER
GO
ALTER DATABASE [SportsStore] SET AUTO_UPDATE_STATISTICS_ASYNC OFF
GO
ALTER DATABASE [SportsStore] SET DATE_CORRELATION_OPTIMIZATION OFF
GO
ALTER DATABASE [SportsStore] SET TRUSTWORTHY OFF
GO
ALTER DATABASE [SportsStore] SET ALLOW_SNAPSHOT_ISOLATION OFF
GO
ALTER DATABASE [SportsStore] SET PARAMETERIZATION SIMPLE
GO
ALTER DATABASE [SportsStore] SET READ_COMMITTED_SNAPSHOT OFF
GO
ALTER DATABASE [SportsStore] SET  READ_WRITE
GO
ALTER DATABASE [SportsStore] SET RECOVERY FULL
GO
ALTER DATABASE [SportsStore] SET  MULTI_USER
GO
ALTER DATABASE [SportsStore] SET PAGE_VERIFY CHECKSUM
GO
ALTER DATABASE [SportsStore] SET DB_CHAINING OFF
GO

/*
 * If you've already created a blank database called SportsStore, then just run the
 * following lines to create the schema and initial data
*/

USE [SportsStore]
GO
/****** Object:  Table [dbo].[Products]    Script Date: 02/10/2009 13:47:08 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Products](
	[ProductID] [int] IDENTITY(1,1) NOT NULL,
	[Name] [nvarchar](100) NOT NULL,
	[Description] [nvarchar](500) NOT NULL,
	[Category] [nvarchar](50) NOT NULL,
	[Price] [decimal](16, 2) NOT NULL,
	[ImageData] [varbinary](max) NULL,
	[ImageMimeType] [varchar](50) NULL,
 CONSTRAINT [PK_Products] PRIMARY KEY CLUSTERED 
(
	[ProductID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
SET IDENTITY_INSERT [dbo].[Products] ON
INSERT [dbo].[Products] ([ProductID], [Name], [Description], [Category], [Price], [ImageData], [ImageMimeType]) VALUES (1, N'Kayak', N'A boat for one person', N'Watersports', CAST(275.00 AS Decimal(16, 2)), NULL, NULL)
INSERT [dbo].[Products] ([ProductID], [Name], [Description], [Category], [Price], [ImageData], [ImageMimeType]) VALUES (2, N'Lifejacket', N'Protective and fashionable', N'Watersports', CAST(48.95 AS Decimal(16, 2)), NULL, NULL)
INSERT [dbo].[Products] ([ProductID], [Name], [Description], [Category], [Price], [ImageData], [ImageMimeType]) VALUES (3, N'Soccer ball', N'FIFA-approved size and weight', N'Soccer', CAST(19.50 AS Decimal(16, 2)), NULL, NULL)
INSERT [dbo].[Products] ([ProductID], [Name], [Description], [Category], [Price], [ImageData], [ImageMimeType]) VALUES (4, N'Shin pads', N'Defend your delicate little legs', N'Soccer', CAST(11.99 AS Decimal(16, 2)), NULL, NULL)
INSERT [dbo].[Products] ([ProductID], [Name], [Description], [Category], [Price], [ImageData], [ImageMimeType]) VALUES (5, N'Stadium', N'Flat-packed 35,000-seat stadium', N'Soccer', CAST(8950.00 AS Decimal(16, 2)), NULL, NULL)
INSERT [dbo].[Products] ([ProductID], [Name], [Description], [Category], [Price], [ImageData], [ImageMimeType]) VALUES (6, N'Thinking cap', N'Improve your brain efficiency by 75%', N'Chess', CAST(16.00 AS Decimal(16, 2)), 0x89504E470D0A1A0A0000000D494844520000005B000000520802000000B45B3F06000000097048597300000EC400000EC401952B0E1B0000000774494D4507D90209130A2156CB1E500000000774455874417574686F7200A9AECC480000000C744558744465736372697074696F6E00130921230000000A74455874436F7079726967687400AC0FCC3A0000000E744558744372656174696F6E2074696D650035F70F090000000974455874536F667477617265005D70FF3A0000000B74455874446973636C61696D657200B7C0B48F00000008744558745761726E696E6700C01BE6870000000774455874536F7572636500F5FF83EB0000000874455874436F6D6D656E7400F6CC96BF00000006744558745469746C6500A8EED227000012C849444154789CED9C7B5C53579EC07FE79C9B80803C8400114194970A8A522D8802D647BB42918FAD53B775B6A5DD766B5FD3E2D6E9D8D259C7D5F6D3D9B65B75566DABA3B5D6A96D5D8722AD8A8FD5A2A306A18802210182F24C208440082109D93FEE23978821D10BFA87BF0F9F706E72EEBDE77CF37B9CDFEFDE5C64B3D9E081F004DFEB01DC77F28088A350F77A00C38B52A9DCBF7F7F515191C9645ABE7CF9534F3D356FDEBCB13935BA4FFC8852A9ACABABA3DB2525255BB76EF5F1F1F1F1F1C118EBF5FAFEFEFEF7DF7F3F2F2F6F0C4672CF889C3B77AEB0B0B0E8E713F5CA5A93A9DF6BBCBFD8CB9FFEA8A7A3293E7E86A7A727D7797070F0CA952B7E018113274E8C9F113F2D2E7AE9D2A5E9E9E9A331B0B126525050B075FB8E0B25E73CC707593C43C5019345E34330E5C9EFD3A33C2936B5040705FAF9F901404F4F8FB64BD76B168524E6988D5DE69E0EAB493FD8D3A4EB68499CFDD09AA79F5ABD7A7558589850231C3B22CDCDCDBF59FD744D7DF3A06F8C4760940305FB80104218199B4AFBDAAB4C7A350078F8047A0747074D5F4651228C11C218238410029BA5A75D696CAFE96AAE4E4A4A5AFFEF79393939773FCEB12062341AFF63E37FEED8B58B0A4B1D278973361A8430C618238C09C65C9BE58011FD8210C218D160683A9DAA0AFD0D5958B0FFB707BF8E8E8EBE9BD18E3A11A3D1B870D15255874514968290B3D0C6E1209860424F1B13960B625E909D1AF31E208410220883F6466573F9D16D9F7DF2DB35CFDCF18047978856AB4D9A9762183F93F28B1C611C4371F05503138C11421811BEB2D06A8208B09810421881CD6A519CFB6BDE6B2FE6BDF9C69D8D7914892895CA4796FD93312059343E74844120A0E73D040763390863C430615506311408AB3276F3A15546716EFF6B2FFE73DEEFEE04CA6811696E6E7E787EFA40C842CA2B68841120A0DDC6B03808EB4A08AB1AB48341342B1E0B7E1B10541CDDFAE9477F5AF5E413EE8E7C5488188DC6C4871EEE14C78BFD460E8A186342982913826FC16177258C43418410C45A0F8FC5104D41E6FEBE5F8B3EFBB9F07F67CE9CE9D6E04785C8A2C5CBAEA945A2C0E923F664E749EC2CC82D3808E3490826080F71ABB47F615960CC7859068F41D75E56F859439D62DCB871AE0F5EF84C6FDDDBEF54DDEC7505071B3608176909135A1D71608C082188204230C188D0E0B83F4C284208C1845084A2082184608A60FFA08913A7A7AD7DF535B7C62F3091CACACABD5F1DC0D28747EC8910702103614468E7401B0C460E38E877E92D4208B1BF628AA143082184C214C114C501C2F10B728A4F9D3B77EE9CEB5310D86A5217A657697D9D2FC36861622DA10861822EDD602930E6C3E1E03B14BB592184195362948BF3235CDCE96C5656FFDFD7577FBDE2A2ED08A9233299EC7AB582C3E1EFE7131A1CE0E33DCC3858BB27AC6BA4B58569B18A826EC5417FF318638A753FB45EB0E633C49A284208C6211171E382267FF2C9A72ECE42481DA115C42774BA8758FCF6CBAB664C0D21602D299337B777955EAFEFE9317676F5D03D6945A0C32D3B138230B2CF8AA1C0B4381C9875311821D6FF306198177AD8852CD0C1070C3D9D455FFCA1E946A32B6A221811AD563B29227252FA6BCFFFE6D1DFAE982F192FA2300C02D8002C16D4A6D55F55B4C8EB5B4E5FAA36F419BB7406837180F38B84E0A1C682083D5BE613EC8083094784B7AEE52DEA197DC31C1484109414EC7CF2B1D4FCFCF7C68EC8CE9D3BDFFD60C7F3795BFEFC6636C660B3D960E891AD36B00E228B155AB5FAF365CACADA9B17CA155A9D815378CE28180A8470DEE4561C6CB4E6E340ECD2DFEE47186D01E86C6B3CFDCD07CDCD37C78EC89CB9C9AA7E695044C292053313A227A6244E991D3311810D0001023E1DAB0D01807510C96ADADEF9F8A05E6FC07C2FC0CC9F2204F1B486711F0E3808E1EB0871488811428CA6200400873E7DE39BAF768F586712C6B36AB55A794DB5C784C9BD0663C189CB5BBF3A7EFA628DD90A008031AE54B63569F40831E722C84690CD8382DEBE7E5D772FE70238DFCACE8D75B1ACE3180607C70B13BE7E118AFD63C3B08890D88796ECDCF5C588731186C8A143873C022673C97EAFC1B82039C9438400A183C72ADEFCF06F3BBE2B3159100058817100660B5CAB6DE0927936F7B52F43319BCF6276A9826EC5C1785C32C4AC782028824584A2DF9893BAFCA79F8E1A8DC6B12072E9B2CC22F2E7367396CD4B9CE2671B1CD41B072F5F6FACAD6F31DA3CC1360800162B7CB4B778F7918BFFA86C3CF6CB35C4BA41CC0F15BC8485F30E18634218404370308B375A49681C98C298C294885014A108A6D76CD8C7CF3F28247CC4D59A3057274E9E3AE311944AB745222A654E9C88020068EDD069B43A007821E761FA9DD2AA9B078B2E5204F7F79B2942185341C0590D4F5D10FBC25549EC46341407DD815DBF0DAD12D05E0421004061D1B34E14173FF6D863A34B44ABD5AAD5AD81539822C8B4B8E898A8080260B181BCA1FDBABC7176FCD429126F04361BA0E676ADD5623599CC04631B026207013C05610B4888E76258F3216CA0E5E32014CDC2EE75381AB419D2FE7D72CCACF3170A9D4F4700AB3971E2844FE064BA8D109A171F3667B23F42306845E74AE5BD86FE6953A5DEE3080060044DAD1A93D9CAFBEA386731246CDA2920F6FB67A6C6AF0C0CC5C14B7698570A53146B478422849A3839BA4EA9743E1D0174E4F265999575225E5E9E8931933CC408C026A2905ADB2D1691A96192419B8D0020842E57AAB89C1D9083D8E7EC909F60841102CC4657C2D5D2F838EC2A8398F2019DF570E701A0A891E72B808E5CBC2C435E12BA1D1F1719372514C00600662B9C3E7FCDD3539C941049AF47AC3624A2087F963C011E204043150471AAC1E6CA749B108490030E465330E1220E11112C22982224441AD1A1691F75224A659DC83B906E2F4F9F1B39916EA3CEDE0100300D986D8340100080D90272551B337D8600D81D2AE62B8D8302817D61CA190D41984EF9103F12D3B199A910501853BCD54A5747735070C8E812D16AB53A5D27574CB5DA6C069355DDDD6F45786FC14500D0F7F44D8F92D29FF6F41AE263C2B92C0CE81536B34D7FF74341D8EBA9D81190DDF57245033B0E8CB1882D9D50224C4498A20845E1DAAB97172E5CE87C4677EB47FEF23F3B7CA4F1DCE6E6AD07761DF00F0B99101AECFFCBA5EB0060B50E9E29AD5D91368D80CDDF77DCEF9ECBFECBC11357ABEA2CD641CCDA0A001D1E79B3653FB28721C4DA0E6FC5C2290E61D67D0C0ECABE86E13A2240A8E2C2B12D7F1A21D9732FAFD16AB53299ACA5A5A5AAAA0A000A7F3A565FDFE83FFB6922F671B2576478C89F7FFF2F736283BDC4C832881ADBBB4F5D56EE3C789C60425198604CB15530AED24197362811C514CA081B4728A68046312B31C2D41031C684A93F7138B8DA2D4DB9E86F3B4DBAC6C282BF3B9FE3083A62341A0B0A0AAE5CB972ECC469456D0D0004844E1179F9639F50003041101ED76BB3F48353228D4DEABC2D7B1F9A19353336421AEC7FA1AC56DDD93DC462182DE0FB56401803387816CC4665467D6843C308D8A508179EB9CC9089447F3FB0EDBAECCC1F7EFFB6F3F9C2ED7444ABD51E3A7468CFBE03BF965D0E8D9A43F9454C889CE31B1A23F21CEFD0B3EE97FD2D95276D0062C9344F492CE5E97FEBD11857C7948631F355134CAFAF09C614A108C5ACC41905A15F294C714E92E94C287AA141E8636042118ACB6530574F6396F698E09E2EF5971FBD9D326F76F6E3594AA572DDBA75CE8938EA88D168DCF06EFEEE3D7B02236707C42C7D6451BEF3FDA3D29E8D4A7B56DF56DB54FE93A6F23022225160F43849ECD00B5788FBC72805BDC9F91164DFE6948569B1DD30FB36DB832D4D22E0C238E1274118F7F7F51CF9EAD38A4B67B66DFD2C3333532693190C06E7D37124A2542A1FCBCCC192F8E497BEC29478C49D39F10D8D9DB13C1600F46DB5ADD74EA96B7EB2DAAC62DF3091FF64CFA0284062368CB0849860C3E41B4C2CA679B104397C1C35D6B9B21E17C0FEA13D25028450CB0DE5E9237BAB7FFDC7DA575E3EF0E5677431D1CBCBABAFAFCF0D2246A37141FA2391CBDEF60D8D759DC5AD687C4363E396BE62E850753694AB9517D5F2631E01E11E7E61DEC1315E1326811DCA9006E280317119101ED20301665031BCB05D7758B5BA5157A5B876E9D2A92304E3D75E5DFBF5EEADFEFE762B0E0E0E56ABD56E1029282810F94AEF06075FBC8322BD832223E6AD04008DF2A25655DE51735C6DD48F9B10E1E91BEC2389F40D994A88276FCAC04E967E07D39BACE1307FF6A50C6B684DAAEAFAAAD29BF2F206C5B550A9346DE1822387BF9F3163C63043F2F6764F47E6CE9D6BD4360F5A06DCB2175744129D22894E890330F5766A1BCAF4EDCA0EC579D58503622F7FAF00A94F80D45F1A3561622C10024C0D7288A0A1CDDEEE4E5DFBCD9686EB8DF25F5B1BE592E0E0A54B97AC7EF3E5254B96F035E25671D16A86C49A8D9B361F28BA3465D1ABEECCF7CEC5D0A1D2B72AF4EDCAEE96EA1E750325F2F4F20F01049249B1ECE52866B16A36193B5B55805047532D25F624844C080858919DB561C306E7141CE4D9679F2D282870DEC731FABEFA46DE89CBCA3183C217536F676F4723006855E50E1F99FBF4D681DEDEF6DA007FBF57FEED5F9F78E209A954EAEEF1CD66F3DAB56B7FF8E107E7DD1CA3EF8EEDFFBD71D3E61D5FBE396DC51F3D7C02DD3DEBDD88874F207DC6C0C824536FA7BE4DA16BBADEAFAE6E57554D4F487C3CE7D1952B3F19D641B8283A9D8EBEF9D1B90CB366DDF8C7FCC58BD2739E581514B72822658DE06E655831EA5A7A3B6EE89AAE5B7437F4EA8641AB3926765ACE82E48C8C67962C5922C829743A9D2B2636FC2A3E3D3DBDE566E38677F3F7ED7D5132FD11E9EC15C2EA8BA143D5DFABD5AACAC1D4DDDFDDD2D154EBEB173039726ACE82E4C4C4CCA4A4A42953A608783A5AFAFAFABCBDBD47EC3642A6D7DCDCFC5F1F7FBAE7AF7B0226257887CD96C4A4B88B46D75469B598BB9BAE5B2D03FDEA6A73BF41DBD6182C0D0B0C0C5AB63823242464DAB469A9A9A96EDDF4726772F6EC595756F1AEE6BE7BF7EE3D5270F4CC99531EDE01220F6F4F49B46DB85B3191CD62D42800A0BF57D7DDD102005363A67B788817CC4FF61AE7999191111010909494E4FE7404901F7FFCD162B13CFFFCF3CEBBB97D9553269369B5DAF3E7CFF32F0569349AEAEAEA9494140F0F8F94941400904AA50E5E303737372626E685175EB8833021887CF1C5178989898F3EFAA8F36EC25CF71D181878EEB9E7B66FDF2E12896ED7A7A1A161D7AE5DDF7DF75D4646C6AC59B31213136997595656D6D5D5555353535252A2542A653299C38EB9B9B9DDDDDD3367CE1C56C5AAAAAA5A5B5BDBDADAD6AC59E37C90EBD6ADDBB2654B68E848B7920A75257CC3860DD9D9D9F1F1F123F6DCB367CFD5AB57AF5DBB76E5CA1500888989F1F5F58D8989494B4B1B76560D0D0D656565151515E7CF9FD7EBF50A8582FF69444484442259BC78F17BEF392B8E69349A0F3FFC70CF9E3D230E4F3022DF7CF38DC9647AF2C92705399AE0E2A25B0501EFBA4A484890CBE5421D4D7091CBE5090909AEF4148CC8F4E9D36FDCB861369B853AA0B0525353336BD62C577A0A46442C16474646D6D6D60A75400145A3D100C0883E951621EF55CCCECE2E2E2E16F08042C9F1E3C71F7FFC71173B0B49243535B5AEAE4EA7D30978CCBB17B3D95C5656969191E1627F81EF795EB972E5D1A347853DE65DCAC99327939393274C98E0627F81896465655DBA74C99552D598494949895BD9B3C044C462F1C2850BCF9E3D2BEC61EF58643259484848545494EBBB08FFDB8955AB56151717DF2761B8B8B878C58A156EED322ABFAF292A2A522A95B9B9B9B7EB909B9B7BF3A6FD66DBF0F0F08888086E332E2E8E1F2967CC987167C9617171715B5BDBEBAFBFEED65EA3F5AB34E7694E4343437D7D3DB7A952A91A1B1BB94D8542C1BFB0525F5FDFD5D5C56DD27910DDDEBE7DFBEDEA8C1A8DE6E38F3FDEB66D9B58EC5E0D70B488B4B5B56DDCB871F3E6CD4EB2E13B133A57A6DB4E4A4D1F7CF0C133CF3C939898E8EEF147F1B79C23DACEE8496161A1D96C1EB13834AC8CE2F347B2B2B23A3B3B2B2A2A46EF14C38A4AA52A2F2F1FB15C723B19DD27B2E4E7E79F3D7B762CA1A854AA6FBFFD76D3A64DEEBA0F4E469788582C7EE79D77C60C4A4B4BCBFEFDFBF3F3F35DA9B9DF4E46FDA93D630645A3D1ECDBB76FFDFAF5778303C6EC691B0303039B376F9E3B77AEEB19975BA25028BEFFFEFBBCBC3C17537E273276CF1F31180C9F7FFEB956AB7DE9A597DCBA7CED5CCC66F3E1C3876B6B6BD7AF5F7FF73860EC9F51535A5ABA7BF7EECCCC4C419445A150ECDBB72F2D2D6DF5EAD5777F345AEEC1738C3865C9CCCC74A5763FACB4B4B41C3B76ACA9A9E9ADB7DE0A0F0F177078F7ECC94EA5A5A5870F1F56ABD58B162D9A3F7FBE442271652F9D4E2793C94E9E3C0900D9D9D9595959820FEC1E3FFDABADADEDE79F7F2E2929914AA553A74E0D0A0A0A0A0A0A0E0EE600E974BAE6E6E6EEEEEED6D6D6D6D656B95C9E9C9CBC62C50A61F5822FF7CBF3D04A4B4BE572797B7BBB46A351ABD51D1D1DF4FB7E7E7E6161617E7E7EE1E1E193264D1AA550C597FB85C8FD230F9EABE8280F8838CA03228EF28088A3FC3FD1E28D325AD906BF0000000049454E44AE426082, N'image/x-png')
INSERT [dbo].[Products] ([ProductID], [Name], [Description], [Category], [Price], [ImageData], [ImageMimeType]) VALUES (7, N'Concealed buzzer', N'Secretly distract your opponent', N'Chess', CAST(4.99 AS Decimal(16, 2)), NULL, NULL)
INSERT [dbo].[Products] ([ProductID], [Name], [Description], [Category], [Price], [ImageData], [ImageMimeType]) VALUES (8, N'Human chess board', N'A fun game for the whole extended family!', N'Chess', CAST(75.00 AS Decimal(16, 2)), NULL, NULL)
INSERT [dbo].[Products] ([ProductID], [Name], [Description], [Category], [Price], [ImageData], [ImageMimeType]) VALUES (9, N'Bling-bling King', N'Gold-plated, diamond-studded king', N'Chess', CAST(1200.00 AS Decimal(16, 2)), NULL, NULL)
SET IDENTITY_INSERT [dbo].[Products] OFF